feat: add agent-friendly test output commands#75
Merged
Conversation
Closes #72 Add test:agent, lint:agent, and typecheck:agent scripts that produce minimal, machine-readable output optimized for AI coding agents. Changes: - Add test:agent scripts using Mocha's min reporter (only failures + summary) - Add lint:agent scripts using ESLint's --quiet flag - Add typecheck:agent scripts using tsc --pretty false - Add runSilent() helper using oclif's captureOutput to suppress command output - Update stubParse helpers to set log-level: silent by default - Add global test setup to set SFCC_LOG_LEVEL=silent - Add logger destination option for custom output streams in tests - Update tests to use runSilent() for non-JSON mode tests - Remove unused operations/sites module (dead code) - Update AGENTS.md with agent-friendly command section - Update testing skill documentation with output silencing patterns
Collaborator
Author
|
@yhsieh1 if you have time to review this that would be great as this should improve agent usage since it greatly reduces the context used up running tests, etc |
yhsieh1
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #72
Adds agent-friendly command variants with minimal, machine-readable output optimized for AI coding agents. This reduces context token usage and makes it easier to identify actual failures.
New Commands
pnpm run test:agentpnpm run lint:agentpnpm run typecheck:agentKey Changes
Test Output Silencing:
runSilent()helper using oclif'scaptureOutputto suppress stdout/stderr from command executionstubParsehelpers to set'log-level': 'silent'by defaulttest/setup.ts) to setSFCC_LOG_LEVEL=silentrunSilent()for clean outputLogger Enhancements:
destinationoption tocreateLogger()for custom output streamscreateNullStream()andCapturingStreamtest helpers for logger testingresetLogger()export to reinitialize logger after config changesDocumentation:
AGENTS.mdwith new "Commands for Coding Agents" section.claude/skills/testing/SKILL.md) with output silencing patterns and test helpers referenceCleanup:
operations/sitesmodule (dead code with unimplemented stubs)Example Output
Before (verbose):
After (agent-friendly):
Failure output remains clear: